package redis;

import redis.clients.jedis.JedisPubSub;

/**
 * @author sjw
 * @description
 * @date 2019-09-30 上午10:24
 */
class SubscribeClient extends JedisPubSub {
    public void onMessage(String channel, String message) {
        System.out.println(Thread.currentThread().getId()+ "::onMessage---"+channel+ "---"+message);
    }

    public void onPMessage(String pattern, String channel, String message) {
        System.out.println("onPMessage---"+pattern+ "---"+channel+ "---"+message);
    }

    public void onSubscribe(String channel, int subscribedChannels) {
        System.out.println("onSubscribe---"+channel+ "---"+subscribedChannels);
    }

    public void onUnsubscribe(String channel, int subscribedChannels) {
        System.out.println("onUnsubscribe---"+channel+ "---"+subscribedChannels);
    }

    public void onPUnsubscribe(String pattern, int subscribedChannels) {
        System.out.println("onPUnsubscribe---"+pattern+ "---"+subscribedChannels);
    }

    public void onPSubscribe(String pattern, int subscribedChannels) {
        System.out.println("onPSubscribe---"+ pattern+ "---"+subscribedChannels);
    }

    public void onPong(String pattern) {
        System.out.println("onPong---"+ pattern);
    }
}
